#!/usr/bin/python
#-*- coding: utf-8 -*-

import sys, os, re

agehash = {}
filelist = os.listdir("seer")

for file in fileist:
    infile = open(file, 'r')
    for line in infile:
        age = line[24:27]
        if re.search(r'[01][0-9]{2}', age):
            if agehash.has_key(age):
                agehash[age] = agehash[age] + 1
            else:
                agehash[age] = 1
    infile.close()

keylist = agehash.keys()
keylist.sort()
for item in keylist:
    print item, agehash.keys(item)
    